]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
networkAgent: Fetch environment from launch context before spawn_async()
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 26 Oct 2023 14:04:46 +0000 (16:04 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 3 Nov 2023 20:47:44 +0000 (20:47 +0000)
This will fetch the right environment for the launched application,
without using GNOME Shell's environment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>

js/ui/components/networkAgent.js

index 6a4aa77473e0a745df962f05740a3c22cb9a1c99..3d187a87897eb1c2cc62d76c92f4137641304243 100644 (file)
@@ -455,11 +455,12 @@ class VPNRequestHandler extends Signals.EventEmitter {
         this._newStylePlugin = authHelper.externalUIMode;
 
         try {
+            const launchContext = global.create_app_launch_context(0, -1);
             let [success_, pid, stdin, stdout, stderr] =
                 GLib.spawn_async_with_pipes(
                     null, /* pwd */
                     argv,
-                    null, /* envp */
+                    launchContext.get_environment(),
                     GLib.SpawnFlags.DO_NOT_REAP_CHILD,
                     () => {
                         try {